import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  //示例默认页面： ‘/’时路由的页面（默认页面）
  // { path: '/', redirect: '/home'},
  // {
  //   path: '/',
  //   name: 'layout',
  //   component: () => import('@/layout'),
  //   redirect: '/index',
  //   meta: { label: '首页' },
  //   children: [
  //     {
  //       path: '/index',
  //       name: 'index',
  //       component: () => import('@/views/home')
  //     },
  //     {
  //       path: '/profile',
  //       name: 'profile',
  //       component: () => import('@/views/profile'),
  //       meta: { label: '个人中心' }
  //     }
  //   ]
  // },
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/login/index.vue')
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
